﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Qy.Scenario;

[SugarTable(DbTableName.QyAdminPost)]
public class UserPost
{
    [SugarColumn(IsPrimaryKey = true)]
    public int Id { get; set; }
    public string PostName { get; set; }
    public string PostCode { get; set; }
    public string Ico { get; set; }
    public int Sort { get; set; }
    public string Remark { get; set; }

}

public class EditUserPost
{
    public int Id { get; set; }

    [Display(Name = "岗位名称")]
    public string PostName { get; set; }
    [Display(Name = "岗位代码")]
    public string PostCode { get; set; }
    public string Ico { get; set; }
    [Required(ErrorMessage = "请输入{0}")]
    [Display(Name = "岗位排序")]
    [RegularExpression(RegxPatterns.Number, ErrorMessage = "{0}必须为数字")]
    public int Sort { get; set; }
    [Display(Name = "备注")]
    public string Remark { get; set; }
}
